﻿<ResourceDictionary 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:debugOutputVM="clr-namespace:CrackNET.InjectedViewer.ViewModel.DebugOutput"
  xmlns:ElementTreeExplorerVM="clr-namespace:CrackNET.InjectedViewer.ViewModel.ElementTreeExplorer"
  xmlns:memoryExplorerVM="clr-namespace:CrackNET.InjectedViewer.ViewModel.MemoryExplorer"
  xmlns:scriptoriumVM="clr-namespace:CrackNET.InjectedViewer.ViewModel.Scriptorium"
  xmlns:debugOutputView="clr-namespace:CrackNET.InjectedViewer.View.DebugOutput"
  xmlns:ElementTreeExplorerView="clr-namespace:CrackNET.InjectedViewer.View.ElementTreeExplorer"
  xmlns:memoryExplorerView="clr-namespace:CrackNET.InjectedViewer.View.MemoryExplorer"
  xmlns:scriptoriumView="clr-namespace:CrackNET.InjectedViewer.View.Scriptorium"
  >
  <DataTemplate DataType="{x:Type ElementTreeExplorerVM:ElementTreeExplorerViewModel}">
    <ElementTreeExplorerView:ElementTreeExplorerView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type memoryExplorerVM:MemoryExplorerViewModel}">
    <memoryExplorerView:MemoryExplorerView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type debugOutputVM:DebugOutputViewModel}">
    <debugOutputView:DebugOutputView />
  </DataTemplate>
  
  <DataTemplate DataType="{x:Type scriptoriumVM:ScriptoriumViewModel}">
    <scriptoriumView:ScriptoriumView />
  </DataTemplate>

  <LinearGradientBrush x:Key="PrimaryBackgroundBrush" StartPoint="0,0.5" EndPoint="1,0.5">
    <GradientStop Offset="0" Color="#00000000" />
    <GradientStop Offset="0.25" Color="#16000000" />
    <GradientStop Offset="0.5" Color="#08000000" />
    <GradientStop Offset="1" Color="#00000000" />
  </LinearGradientBrush>

  <Style x:Key="InjectedWindowToolBarStyle" TargetType="{x:Type ItemsControl}">
    <Setter Property="Background" Value="{StaticResource PrimaryBackgroundBrush}" />
    <Setter Property="ItemTemplate">
      <Setter.Value>
        <DataTemplate>
          <Button 
            Command="{Binding Path=Command, Mode=OneTime}"
            Content="{Binding Path=DisplayName, Mode=OneTime}" 
            Margin="8,6"
            MinWidth="190"
            />
        </DataTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <WrapPanel Orientation="Horizontal" />
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style x:Key="InjectedWindowTabControlStyle" TargetType="{x:Type TabControl}">
    <Setter Property="IsSynchronizedWithCurrentItem" Value="True" />
    <Setter Property="ItemTemplate">
      <Setter.Value>
        <DataTemplate>
          <DockPanel MinWidth="130">
            <Button 
              Command="{Binding Path=CloseCommand}"
              Content="X"
              Cursor="Hand"
              DockPanel.Dock="Right"
              Focusable="False"
              FontFamily="Courier" 
              FontSize="11"
              FontWeight="Bold"  
              Margin="0,1,0,0"
              Padding="0"
              VerticalContentAlignment="Bottom"
              Width="16" Height="16" 
              />
            <ContentPresenter 
              Content="{Binding Path=DisplayName}" 
              VerticalAlignment="Center" 
              />
          </DockPanel>
        </DataTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Margin" Value="2" />
  </Style>
</ResourceDictionary>